﻿#region << 文 件 说 明 >>
/*----------------------------------------------------------------
// 文件名称：ProjectPoco
// 创 建 者：杨程
// 创建时间：2021/10/12 15:51:03
// 文件版本：V1.0.0
// ===============================================================
// 功能描述：
//		
//
//----------------------------------------------------------------*/
#endregion

using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Vampirewal.Core.Models;

namespace V.CodeGenerator.CreateCodes.Model
{
    [SugarTable("CodeGenerator_ProjectBaseInfo")]
    public partial class ProjectPoco : BillBaseModel
    {

        /// <summary>
        /// 工程名称
        /// </summary>
        [Required(ErrorMessage = "工程名称不能为空",AllowEmptyStrings =false)]
        public string ProjectName { get; set; }

        /// <summary>
        /// 工程描述
        /// </summary>
        public string ProjectDescription { get; set; }

        /// <summary>
        /// 连接字符串
        /// </summary>
        [Required(ErrorMessage = "连接字符串不能为空", AllowEmptyStrings = false)]
        public string ProjectConnectionString { get; set; }

        private string _SaveFolderPath;
        /// <summary>
        /// 工程保存路径
        /// </summary>
        [Required(ErrorMessage = "工程保存路径不能为空", AllowEmptyStrings = false)]
        public string SaveFolderPath { get=> _SaveFolderPath; set { _SaveFolderPath = value;DoNotify(); } }

        
    }

    public partial class ProjectPoco
    {
        public ProjectPoco()
        {
            ModuleFunctionPocos = new List<ModulePoco>();
            ModelPocos = new List<ModelPoco>();
            ViewPocos = new List<ViewPoco>();
            ModuleFunction_Tree = new List<ModulePoco>();
        }


        /// <summary>
        /// 模块功能明细
        /// </summary>
        [SugarColumn(IsIgnore =true)]
        public List<ModulePoco> ModuleFunctionPocos { get; set; }

        private List<ModulePoco> _ModuleFunction_Tree;
        /// <summary>
        /// modulefunction树形构造
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public List<ModulePoco> ModuleFunction_Tree { get => _ModuleFunction_Tree; set { _ModuleFunction_Tree = value; DoNotify(); } }

        /// <summary>
        /// 实体类明细
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public List<ModelPoco> ModelPocos { get; set; }

        /// <summary>
        /// View类明细
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public List<ViewPoco> ViewPocos { get; set; }
    }
}
